package edu.netjava.ServerCharThread;

import java.util.Scanner;

/**
 * 
 * @author tan
 *  test ServerChar and give operation to continue with many server
 *
 *
 */
public class ThreadChater {

	public static void main(String[] args){
		
		int port;
		
		
			boolean outCreate = false;
			while(!outCreate){
				
				System.out.println("Please input the port to connect:");
				Scanner sca = new Scanner(System.in);
				port = sca.nextInt();
				
				ServerChar sc = new ServerChar(port);
				new Thread(sc).start();
				
				
				System.out.println("Continue to create server?y/n");
				String choice = sca.next();
				if(choice.equalsIgnoreCase("n")){
					outCreate = true;
				}
				
				
				
			}

			


	}
}
